#include<iostream>
#include<cstring>
#include<cmath>
using namespace std;

unsigned long reserver(char num[], int bg, int ed){
    unsigned long result=0,bits=ed-bg+1;
    while (bits--)
    {
        result += (num[bg+bits]-'0')*pow(10,bits);
    }
    return result;
}


int main()
{
    int bit,length;
    char num[21],cal=0;
    gets(num);
    length = strlen(num)-1;
    for (int i = 0; i <= length; i++)
    {
        if(num[i]=='.'||num[i]=='/'||num[i]=='%'){
            cal=num[i];
            bit=i;
        }
    }
    switch (cal)
    {
    case '.':
        printf("%g",reserver(num,0,bit-1)+(reserver(num,bit+1,length)/pow(10,length-bit)));
        break;
    case '/':
        printf("%lld/%lld",reserver(num,0,bit-1),reserver(num,bit+1,length));
        break;
    case '%':
        printf("%lld%%",reserver(num,0,bit-1));
        break;
    default:
        printf("%lld",reserver(num,0,length));
        break;
    }
    return 0;
}
